import { Component } from "react"
import {Select} from "antd"

class SelectValue extends Component {
  constructor(props) {
    super(props)
    this.state = {
        value: null,
      list: [
        { value: 1, label: <span>sample</span> },
        { value: 2, label: <span>sample</span> },
        { value: 3, label: <span>sample</span> },
        { value: 4, label: <span>sample</span> },
      ],
    }
   
  }
  handleSelect = (data) => {
    // console.log(data)
    console.log(data,454);
    this.props.onGetValue(data)
    // this.setState({value:data})
  }
  render() {
    const { value } = this.props
    // this.setState({ value })
    return <Select style={{width:`100px`}} options={this.state.list} onChange={this.handleSelect} value={value}/>
  }
}
export default SelectValue
